package com.cc.flyingfish.filter;

import com.cc.flyingfish.vo.LoginUserInfo;

/**
 * @author CHENCHEN
 * @title
 * @createTime 2023-02-28 19:51
 */
public class AccessContext {

    private static final ThreadLocal<LoginUserInfo> threadLocal = new ThreadLocal<>();

    public static void setThreadLocal(LoginUserInfo loginUserInfo) {
        threadLocal.set(loginUserInfo);
    }

    public static LoginUserInfo getThreadLocal() {
        return threadLocal.get();
    }

    public static void clearLoginUserInfo(){
        threadLocal.remove();
    }
}
